home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / DriverGestalt.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  19.5 KB  |  413 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DriverGestalt.a
  3. ;
  4. ;    Contains:    Driver Gestalt interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DRIVERGESTALT__') = 'UNDEFINED' THEN
  19. __DRIVERGESTALT__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  25.     include 'OSUtils.a'
  26.     ENDIF
  27.     IF &TYPE('__SCSI__') = 'UNDEFINED' THEN
  28.     include 'SCSI.a'
  29.     ENDIF
  30.  
  31. ; __________________________________________________________________________________
  32. ;  The Driver Gestalt bit in the dCtlFlags 
  33.  
  34. kbDriverGestaltEnable            EQU        2
  35. kmDriverGestaltEnableMask        EQU        $04
  36. ; __________________________________________________________________________________
  37. ;  Driver Gestalt related csCodes 
  38.  
  39. kDriverGestaltCode                EQU        43                    ; various uses 
  40. kDriverConfigureCode            EQU        43                    ; various uses 
  41. kdgLowPowerMode                    EQU        70                    ; Sets/Returns the current energy consumption level 
  42. kdgReturnDeviceID                EQU        120                    ; returns SCSI DevID in csParam[0] 
  43. kdgGetCDDeviceInfo                EQU        121                    ; returns CDDeviceCharacteristics in csParam[0] 
  44. ; __________________________________________________________________________________
  45. ;  Driver Gestalt selectors 
  46.  
  47. kdgVersion                        EQU        'vers'                ; Version number of the driver in standard Apple format 
  48. kdgDeviceType                    EQU        'devt'                ; The type of device the driver is driving. 
  49. kdgInterface                    EQU        'intf'                ; The underlying interface that the driver is using (if any) 
  50. kdgSync                            EQU        'sync'                ; True if driver only behaves synchronously. 
  51. kdgBoot                            EQU        'boot'                ; value to place in PRAM for this drive (long) 
  52. kdgWide                            EQU        'wide'                ; True if driver supports ioWPosOffset 
  53. kdgPurge                        EQU        'purg'                ; Driver purge permission (True = purge; False = no purge) 
  54. kdgSupportsSwitching            EQU        'lpwr'                ; True if driver supports power switching 
  55. kdgMin3VPower                    EQU        'pmn3'                ; Minimum 3.3V power consumption in microWatts 
  56. kdgMin5VPower                    EQU        'pmn5'                ; Minimum 5V power consumption in microWatts 
  57. kdgMax3VPower                    EQU        'pmx3'                ; Maximum 3.3V power consumption in microWatts 
  58. kdgMax5VPower                    EQU        'pmx5'                ; Maximum 5V power consumption in microWatts 
  59. kdgInHighPower                    EQU        'psta'                ; True if device is currently in high power mode 
  60. kdgSupportsPowerCtl                EQU        'psup'                ; True if driver supports following five calls 
  61. kdgAPI                            EQU        'dAPI'                ; API support for PC Exchange 
  62. kdgEject                        EQU        'ejec'                ; Eject options for shutdown/restart (Shutdown Mgr) 
  63. kdgFlush                        EQU        'flus'                ; Determine if disk driver supports flush and if it needs a flush 
  64. kdgVMOptions                    EQU        'vmop'                ; Disk drive's Virtual Memory options 
  65. kdgMediaInfo                    EQU        'minf'                ; return media specific information 
  66. ; __________________________________________________________________________________
  67. ;  Driver Configure selectors 
  68.  
  69. kdcFlush                        EQU        'flus'                ; Tell a disk driver to flush its cache and any hardware caches 
  70. kdcVMOptions                    EQU        'vmop'                ; Change the disk driver's Virtual Memory options 
  71. ; __________________________________________________________________________________
  72. ;  control parameter block for Driver Configure calls 
  73. DriverConfigParam        RECORD 0
  74. qLink                     ds.l    1                ; offset: $0 (0)
  75. qType                     ds.w    1                ; offset: $4 (4)
  76. ioTrap                     ds.w    1                ; offset: $6 (6)
  77. ioCmdAddr                 ds.l    1                ; offset: $8 (8)
  78. ioCompletion             ds.l    1                ; offset: $C (12)
  79. ioResult                 ds.w    1                ; offset: $10 (16)
  80. ioNamePtr                 ds.l    1                ; offset: $12 (18)
  81. ioVRefNum                 ds.w    1                ; offset: $16 (22)
  82. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ;  refNum for I/O operation 
  83. csCode                     ds.w    1                ; offset: $1A (26)        ;  == kDriverConfigureCode 
  84. driverConfigureSelector     ds.l    1                ; offset: $1C (28)
  85. driverConfigureParameter  ds.l    1                ; offset: $20 (32)
  86. sizeof                     EQU *                    ; size:   $24 (36)
  87.                         ENDR
  88. ; __________________________________________________________________________________
  89. ;  status parameter block for Driver Gestalt calls 
  90. DriverGestaltParam        RECORD 0
  91. qLink                     ds.l    1                ; offset: $0 (0)
  92. qType                     ds.w    1                ; offset: $4 (4)
  93. ioTrap                     ds.w    1                ; offset: $6 (6)
  94. ioCmdAddr                 ds.l    1                ; offset: $8 (8)
  95. ioCompletion             ds.l    1                ; offset: $C (12)
  96. ioResult                 ds.w    1                ; offset: $10 (16)
  97. ioNamePtr                 ds.l    1                ; offset: $12 (18)
  98. ioVRefNum                 ds.w    1                ; offset: $16 (22)
  99. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ;  refNum for I/O operation 
  100. csCode                     ds.w    1                ; offset: $1A (26)        ;     == kDriverGestaltCode 
  101. driverGestaltSelector     ds.l    1                ; offset: $1C (28)        ;  'sync', 'vers', etc. 
  102. driverGestaltResponse     ds.l    1                ; offset: $20 (32)        ;  Could be a pointer, bit field or other format 
  103. driverGestaltResponse1     ds.l    1                ; offset: $24 (36)        ;  Could be a pointer, bit field or other format 
  104. driverGestaltResponse2     ds.l    1                ; offset: $28 (40)        ;  Could be a pointer, bit field or other format 
  105. driverGestaltResponse3     ds.l    1                ; offset: $2C (44)        ;  Could be a pointer, bit field or other format 
  106. driverGestaltfiller         ds.w    1                ; offset: $30 (48)        ;  To pad out to the size of a controlPB 
  107. sizeof                     EQU *                    ; size:   $32 (50)
  108.                         ENDR
  109. ;  Note that the various response definitions are overlays of the response fields above.
  110. ;   For instance the deviceType response would be returned in driverGestaltResponse.
  111. ;   The DriverGestaltPurgeResponse would be in driverGestaltResponse and driverGestaltResponse1
  112. ;
  113.  
  114. ; __________________________________________________________________________________
  115. ;  Device Types response 
  116. DriverGestaltDevTResponse RECORD 0
  117. deviceType                 ds.l    1                ; offset: $0 (0)
  118. sizeof                     EQU *                    ; size:   $4 (4)
  119.                         ENDR
  120.  
  121. kdgDiskType                        EQU        'disk'                ; standard r/w disk drive 
  122. kdgTapeType                        EQU        'tape'                ; tape drive 
  123. kdgPrinterType                    EQU        'prnt'                ; printer 
  124. kdgProcessorType                EQU        'proc'                ; processor 
  125. kdgWormType                        EQU        'worm'                ; write-once 
  126. kdgCDType                        EQU        'cdrm'                ; cd-rom drive 
  127. kdgFloppyType                    EQU        'flop'                ; floppy disk drive 
  128. kdgScannerType                    EQU        'scan'                ; scanner 
  129. kdgFileType                        EQU        'file'                ; Logical Partition type based on a file (Drive Container) 
  130. kdgRemovableType                EQU        'rdsk'                ; A removable media hard disk drive ie. Syquest, Bernioulli 
  131. ; __________________________________________________________________________________
  132. ;  Device Interfaces response 
  133. DriverGestaltIntfResponse RECORD 0
  134. interfaceType             ds.l    1                ; offset: $0 (0)
  135. sizeof                     EQU *                    ; size:   $4 (4)
  136.                         ENDR
  137.  
  138. kdgScsiIntf                        EQU        'scsi'
  139. kdgPcmciaIntf                    EQU        'pcmc'
  140. kdgATAIntf                        EQU        'ata '
  141. kdgFireWireIntf                    EQU        'fire'
  142. kdgExtBus                        EQU        'card'
  143. ; __________________________________________________________________________________
  144. ;  Power Saving 
  145. DriverGestaltPowerResponse RECORD 0
  146. powerValue                 ds.l    1                ; offset: $0 (0)        ;  Power consumed in µWatts 
  147. sizeof                     EQU *                    ; size:   $4 (4)
  148.                         ENDR
  149. ; __________________________________________________________________________________
  150. ;  Disk Specific 
  151. DriverGestaltSyncResponse RECORD 0
  152. behavesSynchronously     ds.b    1                ; offset: $0 (0)
  153. pad                         ds.b    3                ; offset: $1 (1)
  154. sizeof                     EQU *                    ; size:   $4 (4)
  155.                         ENDR
  156. DriverGestaltBootResponse RECORD 0
  157. extDev                     ds.b    1                ; offset: $0 (0)        ;   Packed target (upper 5 bits) LUN (lower 3 bits) 
  158. partition                 ds.b    1                ; offset: $1 (1)        ;   Unused 
  159. SIMSlot                     ds.b    1                ; offset: $2 (2)        ;   Slot 
  160. SIMsRSRC                 ds.b    1                ; offset: $3 (3)        ;   sRsrcID 
  161. sizeof                     EQU *                    ; size:   $4 (4)
  162.                         ENDR
  163. DriverGestaltAPIResponse RECORD 0
  164. partitionCmds             ds.w    1                ; offset: $0 (0)        ;  if bit 0 is nonzero, supports partition control and status calls 
  165. ;          prohibitMounting (control, kProhibitMounting) 
  166. ;          partitionToVRef (status, kGetPartitionStatus) 
  167. ;          getPartitionInfo (status, kGetPartInfo) 
  168. unused1                     ds.w    1                ; offset: $2 (2)        ;  all the unused fields should be zero 
  169. unused2                     ds.w    1                ; offset: $4 (4)
  170. unused3                     ds.w    1                ; offset: $6 (6)
  171. unused4                     ds.w    1                ; offset: $8 (8)
  172. unused5                     ds.w    1                ; offset: $A (10)
  173. unused6                     ds.w    1                ; offset: $C (12)
  174. unused7                     ds.w    1                ; offset: $E (14)
  175. unused8                     ds.w    1                ; offset: $10 (16)
  176. unused9                     ds.w    1                ; offset: $12 (18)
  177. unused10                 ds.w    1                ; offset: $14 (20)
  178. sizeof                     EQU *                    ; size:   $16 (22)
  179.                         ENDR
  180. DriverGestaltFlushResponse RECORD 0
  181. canFlush                 ds.b    1                ; offset: $0 (0)        ;  Return true if driver supports the 
  182. ;  kdcFlush Driver Configure _Control call 
  183. needsFlush                 ds.b    1                ; offset: $1 (1)        ;  Return true if driver/device has data cached 
  184. ;  and needs to be flushed when the disk volume 
  185. ;  is flushed by the File Manager 
  186. pad                         ds.b    2                ; offset: $2 (2)
  187. sizeof                     EQU *                    ; size:   $4 (4)
  188.                         ENDR
  189. ;  Flags for purge permissions 
  190.  
  191. kbCloseOk                        EQU        0                    ; Ok to call Close 
  192. kbRemoveOk                        EQU        1                    ; Ok to call RemoveDrvr 
  193. kbPurgeOk                        EQU        2                    ; Ok to call DisposePtr 
  194. kmNoCloseNoPurge                EQU        0
  195. kmOkCloseNoPurge                EQU        $03
  196. kmOkCloseOkPurge                EQU        $07
  197. ;  Driver purge permission structure 
  198. DriverGestaltPurgeResponse RECORD 0
  199. purgePermission             ds.w    1                ; offset: $0 (0)        ;  0 = Do not change the state of the driver 
  200. ;  3 = Do Close() and DrvrRemove() this driver 
  201. ;  but don't deallocate driver code 
  202. ;  7 = Do Close(), DrvrRemove(), and DisposePtr() 
  203. purgeReserved             ds.w    1                ; offset: $2 (2)
  204. purgeDriverPointer         ds.l    1                ; offset: $4 (4)        ;  pointer to the start of the driver block (valid 
  205. ;  only of DisposePtr permission is given 
  206. sizeof                     EQU *                    ; size:   $8 (8)
  207.                         ENDR
  208. DriverGestaltEjectResponse RECORD 0
  209. ejectFeatures             ds.l    1                ; offset: $0 (0)        ;   
  210. sizeof                     EQU *                    ; size:   $4 (4)
  211.                         ENDR
  212. ;  Flags for Ejection Features field 
  213.  
  214. kRestartDontEject                EQU        0                    ; Dont Want eject during Restart 
  215. kShutDownDontEject                EQU        1                    ; Dont Want eject during Shutdown 
  216. kRestartDontEject_Mask            EQU        $01
  217. kShutDownDontEject_Mask            EQU        $02
  218. ;    The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
  219. ;    kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
  220. ;    things about a disk drive. For example:
  221. ;    
  222. ;    • A drive that should never be in the page fault path should return kAllowVMNoneMask.
  223. ;      Examples of this are drives that have manual eject buttons that are not disabled by
  224. ;      software, drives with very slow throughput, or drives that depend on
  225. ;      a network connection.
  226. ;    • A drive that should never be written to but is safe for read-only file mapping
  227. ;      should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
  228. ;      eats write-once space on the disk and CD-ROM drives which are read-only media.
  229. ;    • A drive that should allow VM to create its main backing store file should return
  230. ;      kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
  231. ;      manual eject and don't use a network connection.
  232. ;    
  233. ;    A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  234. ;    what disk drive this call is for. This is a per-drive call, not a per-driver call.
  235. ;    
  236. ;    The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
  237. ;    kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
  238. ;    is not valid).
  239. ;    
  240. ;    Important: All bits not defined here are reserved and should be set to zero until
  241. ;    they are defined for a specific purpose.
  242. ;    
  243. ;    The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
  244. ;    response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
  245. ;    it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
  246. ;    supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
  247. ;    that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
  248. ;    it should return paramErr.
  249. ;
  250.  
  251. DriverGestaltVMOptionsResponse RECORD 0
  252. vmOptions                 ds.l    1                ; offset: $0 (0)
  253. sizeof                     EQU *                    ; size:   $4 (4)
  254.                         ENDR
  255. ;  Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field 
  256.  
  257. kAllowVMReadBit                    EQU        0                    ; Allow VM to use this drive for read access 
  258. kAllowVMWriteBit                EQU        1                    ; Allow VM to use this drive for write access 
  259. kAllowVMNoneMask                EQU        0
  260. kAllowVMReadOnlyMask            EQU        $01
  261. kAllowVMReadWriteMask            EQU        $03
  262. ;    The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
  263. ;    kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
  264. ;    physical block size, the number of blocks that are of that size, and the media type
  265. ;    for a given device.
  266. ;    
  267. ;    A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  268. ;    what disk drive this call is for. This is a per-drive call, not a per-driver call.
  269. ;    
  270. ;    On drives that support ejectable media, the response can change depending on what
  271. ;    media is currently in the drive.
  272. ;
  273.  
  274. DriverGestaltMediaInfoResponse RECORD 0
  275. numberBlocks             ds.l    1                ; offset: $0 (0)        ;  number of blocks 
  276. blockSize                 ds.l    1                ; offset: $4 (4)        ;  physical size of blocks 
  277. mediaType                 ds.w    1                ; offset: $8 (8)        ;  media type identifier 
  278. sizeof                     EQU *                    ; size:   $A (10)
  279.                         ENDR
  280. ;  DriverGestaltMediaInfoResponse.mediaType constants 
  281.  
  282. kMediaTypeUnknown                EQU        128                    ; media type is unknown 
  283. kMediaTypeCDROM                    EQU        129                    ; media type is a CD-ROM 
  284. kMediaTypeDVDROM                EQU        130                    ; media type is a DVD-ROM 
  285. kMediaTypeNoMedia                EQU        -1                    ; no media is present 
  286. ; __________________________________________________________________________________
  287. ;  CD-ROM Specific 
  288. ;  The CDDeviceCharacteristics result is returned in csParam[0] and csParam[1] of a 
  289. ;   standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
  290. ;
  291.  
  292. CDDeviceCharacteristics    RECORD 0
  293. speedMajor                 ds.b    1                ; offset: $0 (0)        ;  High byte of fixed point number containing drive speed 
  294. speedMinor                 ds.b    1                ; offset: $1 (1)        ;  Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc. 
  295. cdFeatures                 ds.w    1                ; offset: $2 (2)        ;  Flags field for features and transport type of this CD-ROM 
  296. sizeof                     EQU *                    ; size:   $4 (4)
  297.                         ENDR
  298.  
  299. cdFeatureFlagsMask                EQU        $FFFC                ; The Flags are in the first 14 bits of the cdFeatures field 
  300. cdTransportMask                    EQU        $0003                ; The transport type is in the last 2 bits of the cdFeatures field 
  301.  
  302. ;  Flags for CD Features field 
  303.  
  304. cdMute                            EQU        0                    ; The following flags have the same bit number 
  305. cdLeftToChannel                    EQU        1                    ; as the Audio Mode they represent.  Don't change 
  306. cdRightToChannel                EQU        2                    ; them without changing dControl.c 
  307. cdLeftPlusRight                    EQU        3                    ; Reserve some space for new audio mixing features (4-7) 
  308. cdSCSI_2                        EQU        8                    ; Supports SCSI2 CD Command Set 
  309. cdStereoVolume                    EQU        9                    ; Can support two different volumes (1 on each channel) 
  310. cdDisconnect                    EQU        10                    ; Drive supports disconnect/reconnect 
  311. cdWriteOnce                        EQU        11                    ; Drive is a write/once (CD-R?) type drive 
  312. cdMute_Mask                        EQU        $01
  313. cdLeftToChannel_Mask            EQU        $02
  314. cdRightToChannel_Mask            EQU        $04
  315. cdLeftPlusRight_Mask            EQU        $08
  316. cdSCSI_2_Mask                    EQU        $0100
  317. cdStereoVolume_Mask                EQU        $0200
  318. cdDisconnect_Mask                EQU        $0400
  319. cdWriteOnce_Mask                EQU        $0800
  320. ;  Transport types 
  321.  
  322. cdCaddy                            EQU        0                    ; CD_SC,CD_SC_PLUS,CD-300 etc. 
  323. cdTray                            EQU        1                    ; CD_300_PLUS etc. 
  324. cdLid                            EQU        2                    ; Power CD - eg no eject mechanism 
  325. ;  the following are used by PC Exchange (and Apple DOS/PC Compatibility Card)
  326.  
  327. ;  Control Codes
  328.  
  329. kRegisterPartition                EQU        50                    ; PCX needs a new Drive (for a non-macintosh partition found on the disk)
  330. OLD_REGISTER_PARTITION            EQU        301                    ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  331. THE_DRIVE                        EQU        0                    ; DrvQElPtr for the partition to register
  332. THE_PHYS_START                    EQU        1                    ; The start of the partition in logical blocks
  333. THE_PHYS_SIZE                    EQU        2                    ; The size of the partition in logical blocks
  334. kGetADrive                        EQU        51                    ; control call to ask the driver to create a drive
  335. OLD_GET_A_DRIVE                    EQU        302                    ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  336. THE_VAR_QUEL                    EQU        0                    ; a VAR parameter for the returned DrvQElPtr
  337. kProhibitMounting                EQU        52                    ; Dont allow mounting of the following drives
  338. kOldProhibitMounting            EQU        2100                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  339. kProhibitDevice                    EQU        0                    ; CS Param 0 and 1 (partInfoRecPtr)
  340. kIsContainerMounted                EQU        53
  341. kOldIsContainerMounted            EQU        2201                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card            
  342. kContainerVRef                    EQU        0                    ; CS Param 0 and 1 (VRefNum)
  343. kContainerParID                    EQU        1                    ; CS Param 2 and 3 (Parent ID)
  344. kContainerName                    EQU        2                    ; CS Param 4 and 5 (File Name)
  345. kContainerResponse                EQU        3                    ; CS Param 6 and 7 (VAR pointer to short result)
  346. kMountVolumeImg                    EQU        54
  347. OLD_MOUNT_VOLUME_IMG            EQU        2000
  348. MV_HOST_VREFNUM                    EQU        0
  349. MV_HOST_PAR_ID                    EQU        1
  350. MV_HOST_NAME                    EQU        2
  351. MV_REQ_PERM                        EQU        3
  352. ;  Status Codes
  353.  
  354.  
  355. kGetPartitionStatus                EQU        50                    ; what is the status of this partition?
  356. kOldGetPartitionStatus            EQU        2200                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  357. kDeviceToQuery                    EQU        0                    ; CS Param 0 and 1 (partInfoRecPtr)
  358. kDeviceResponse                    EQU        1                    ; CS Param 2 and 3 (VAR pointer to short result)
  359. kGetPartInfo                    EQU        51                    ; Get a partition info record based on the provided vrefnum
  360. kOldGetPartInfo                    EQU        2300                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  361. kPartInfoResponse                EQU        0                    ; var parameter (pointer to partInfoRec) CSParam [0-1]
  362. kGetContainerAlias                EQU        52                    ; Get the alias that describes the file this drive was mounted from.
  363. kOldGetContainerAlias            EQU        2400                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  364. kGetAliasResponse                EQU        0                    ;    var parameter (pointer to a Handle) CSParam [0-1]
  365. ;  the result codes to come from the driver interface 
  366.  
  367.  
  368. DRIVER_NOT_INSTALLED            EQU        -1
  369. DRIVER_BUSY                        EQU        -2
  370. CANT_MOUNT_WITHIN_THIS_FS        EQU        -3                    ; can only mount container within residing on HFS volume
  371. VOLUME_ALREADY_MOUNTED            EQU        -4                    ; Already Mounted
  372. ;  requisite structures for PCX control and status calls
  373.  
  374.  
  375. kMaxProhibted                    EQU        2                    ; the max number of volumes the PC can possibly have mounted
  376. ;  GestaltSelector for Finding Driver information
  377.  
  378.  
  379. kGetDriverInfo                    EQU        'vdrc'
  380.  
  381. VerifyCmd                        EQU        5
  382. FormatCmd                        EQU        6
  383. EjectCmd                        EQU        7
  384. ;  Partition information passed back and forth between PCX and the driver
  385. partInfoRec                RECORD 0
  386. SCSIID                     ds        DeviceIdent        ; offset: $0 (0)        ;  DeviceIdent for the device
  387. physPartitionLoc         ds.l    1                ; offset: $4 (4)        ;  physical block number of beginning of partition
  388. partitionNumber             ds.l    1                ; offset: $8 (8)        ;  the partition number of this partition
  389. sizeof                     EQU *                    ; size:   $C (12)
  390.                         ENDR
  391. ; typedef struct partInfoRec *            partInfoRecPtr
  392.  
  393. vPartInfoRec            RECORD 0
  394. VPRTVers                 ds.b    1                ; offset: $0 (0)        ;  Virtual partition version number
  395. VPRTType                 ds.b    1                ; offset: $1 (1)        ;  virtual partition type (DOS, HFS, etc)
  396. drvrRefNum                 ds.w    1                ; offset: $2 (2)        ;  Driver Reference number of partition driver
  397. sizeof                     EQU *                    ; size:   $4 (4)
  398.                         ENDR
  399. ; typedef struct vPartInfoRec *            vPartInfoRecPtr
  400.  
  401. ;  Information related to DOS partitions
  402.  
  403. kDOSSigLow                        EQU        $01FE                ; offset into boot block for DOS signature
  404. kDOSSigHi                        EQU        $01FF                ; offset into boot block for DOS signature
  405. kDOSSigValLo                    EQU        $55                    ; DOS signature value in low byte
  406. kDOSSigValHi                    EQU        $AA                    ; DOS signature value in high byte
  407.  
  408.  
  409.     ENDIF ; __DRIVERGESTALT__ 
  410.  
  411.